package cn.juque.workflow.api.dto.taskinfo;

import cn.juque.common.abstracts.AbstractRequestDTO;
import com.alibaba.fastjson2.JSONObject;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>TaskFinishParamDTO</li>
 * </ul>
 * @date 2023-01-29 09:16:35
 **/
@Data
public class TaskFinishParamDTO extends AbstractRequestDTO {

    /**
     * 流程定义key
     */
    @NotEmpty(message = "流程key不能为空")
    @Size(message = "流程key不能超过{max}个字符", max = 64)
    private String processDefinitionKey;

    /**
     * 任务ID
     */
    @NotEmpty(message = "任务ID不能为空")
    @Size(message = "任务ID不能超过{max}个字符", max = 64)
    private String taskId;

    /**
     * 用户ID
     */
    @NotEmpty(message = "处理人不能为空")
    @Size(message = "处理人不能超过{max}个字符", max = 32)
    private String taskAssignee;

    /**
     * 审批意见
     */
    @Size(message = "审批意见不能超过{max}个字符", max = 100)
    private String approveRemark;

    /**
     * 节点条件
     */
    private JSONObject variables;
}
